local Class = require('lua.lang.Class')
local Scope = require('lua.parser.Scope')
local StatementList = require('lua.parser.ast.statement.StatementList')

--- @class LuaParser : Class
--- @field lexer Lexer
local LuaParser = Class {}

--- @type table<string, boolean>
LuaParser.statListCloseKeywords = {
	['end'] = true,
	['until'] = true,
	['else'] = true,
	['elseif'] = true
}

--- @param lexer Lexer
--- @return LuaParser
function LuaParser:new(lexer)
	--- @type LuaParser
	local o = {}
	o.lexer = lexer
	return setmetatable(o, LuaParser)
end

--- @return void
function LuaParser:parse()
	self:parseStatementList(Scope:new(nil))
end

--- @param scope Scope
--- @return void
function LuaParser:parseStatementList(scope)
	local list = StatementList:new(scope)
	local statListCloseKeywords = self.statListCloseKeywords

end

return LuaParser